import  easygui as eg

if __name__ == "__main__":
    msg = "请填写以下联系方式"
    title = "账号中心"
    filed_names = [" *用户名", " *真实姓名", " 固定电话", " *手机号码", " QQ", " *Email"]
    filed_values = eg.multenterbox(msg, title, filed_names)

    while True:
        if filed_values is None:
            break
        errmsg = ""
        for i in range(len(filed_names)):
            option = filed_names[i].strip()
            if filed_values[i].strip() == "" and option[0] == "*":
                errmsg += ("【%s】为必填项。\n\n" % filed_names[i])
        if errmsg == "":
            break
        filed_values = eg.multenterbox(errmsg, title, filed_names, filed_values)

    print("用户资料如下：%s" % str(filed_values))